package cloudEntity.enumation;

import lombok.Getter;

/**
 * @program: Smart School
 * @ClassName ClassPersonEnum
 * @description:
 * @author: 陈智博
 * @create: 2025-05-20 14:56
 * @Version 1.0
 **/
@Getter
public enum ClassPersonEnum {

    LiveType("在校生",1),
    NotLiveType("毕业生",2),
    DefaultNull("暂无",127);

    private final String sysClassPersonName;
    private final Integer sysClassPersonType;

    ClassPersonEnum(String sysClassPersonName, Integer sysClassPersonType) {
        this.sysClassPersonName = sysClassPersonName;
        this.sysClassPersonType = sysClassPersonType;
    }

    public static String getDescriptionByValue(Integer value) {
        for (ClassPersonEnum status : ClassPersonEnum.values()) {
            if (status.getSysClassPersonType().equals(value)) {
                return status.getSysClassPersonName();
            }
        }
        return null; // 或者抛出异常，根据需求而定
    }

}
